<template>
  <div class="about">
    <!-- <Header /> -->
    
    <!-- 简介头部 -->
    <div class="about-hero">
      <div class="container">
        <div class="hero-content">
          <h1>{{$t('aboutHeroTitle')}}</h1>
          <p class="hero-subtitle">{{$t('aboutHeroSubtitle')}}</p>
          <div class="hero-stats">
            <div class="stat-item">
              <div class="stat-number">10+</div>
              <div class="stat-label">{{$t('statsYears')}}</div>
            </div>
            <div class="stat-item">
              <div class="stat-number">1000+</div>
              <div class="stat-label">{{$t('statsProjects')}}</div>
            </div>
            <div class="stat-item">
              <div class="stat-number">50+</div>
              <div class="stat-label">{{$t('statsPartners')}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 关于我们 -->
    <div class="section">
      <div class="container">
        <h2 class="section-title">{{$t('aboutUs')}}</h2>
        <div class="about-content">
          <div class="about-text">
            <p>{{$t('aboutPara1')}}</p>
            <p>{{$t('aboutPara2')}}</p>
          </div>
          <div class="about-image">
            <img src="https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?w=600&h=400&fit=crop" :alt="$lang.language==='en' ? 'Wheat quality detection' : '小麦品质检测'" />
          </div>
        </div>
      </div>
    </div>

    <!-- 核心优势 -->
    <div class="section bg-light">
      <div class="container">
        <h2 class="section-title">{{$t('advantages')}}</h2>
        <div class="advantages-grid">
          <div class="advantage-card">
            <div class="advantage-icon">
              <el-icon><Monitor /></el-icon>
            </div>
            <h3>{{$t('advEquip')}}</h3>
            <p>{{$t('advEquipDesc')}}</p>
          </div>
          <div class="advantage-card">
            <div class="advantage-icon">
              <el-icon><User /></el-icon>
            </div>
            <h3>{{$t('advTeam')}}</h3>
            <p>{{$t('advTeamDesc')}}</p>
          </div>
          <div class="advantage-card">
            <div class="advantage-icon">
              <el-icon><Document /></el-icon>
            </div>
            <h3>{{$t('advCert')}}</h3>
            <p>{{$t('advCertDesc')}}</p>
          </div>
          <div class="advantage-card">
            <div class="advantage-icon">
              <el-icon><Service /></el-icon>
            </div>
            <h3>{{$t('advService')}}</h3>
            <p>{{$t('advServiceDesc')}}</p>
          </div>
        </div>
      </div>
    </div>

    <!-- 服务范围 -->
    <div class="section">
      <div class="container">
        <h2 class="section-title">{{$t('services')}}</h2>
        <div class="services-grid">
          <div class="service-item">
            <h3>{{$t('serviceQuality')}}</h3>
            <ul>
              <li>{{ $lang.language==='en' ? 'Protein content' : '蛋白质含量检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Wet gluten content' : '湿面筋含量检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Farinograph parameters' : '粉质参数检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Moisture content' : '水分含量检测' }}</li>
            </ul>
          </div>
          <div class="service-item">
            <h3>{{$t('serviceNutrition')}}</h3>
            <ul>
              <li>{{ $lang.language==='en' ? 'Dietary fiber' : '膳食纤维检测' }}</li>
              <li>{{ $lang.language==='en' ? 'B vitamins' : 'B族维生素检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Total polyphenols' : '总多酚检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Total flavonoids' : '总黄酮检测' }}</li>
            </ul>
          </div>
          <div class="service-item">
            <h3>{{$t('serviceSafety')}}</h3>
            <ul>
              <li>{{ $lang.language==='en' ? 'Pesticide residues' : '农药残留检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Heavy metals' : '重金属检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Mycotoxins' : '真菌毒素检测' }}</li>
              <li>{{ $lang.language==='en' ? 'Microorganisms' : '微生物检测' }}</li>
            </ul>
          </div>
        </div>
      </div>
    </div>

    <!-- 联系我们 -->
    <div class="section bg-light">
      <div class="container">
        <h2 class="section-title">{{$t('contactUs')}}</h2>
        <div class="contact-content">
          <div class="contact-info">
            <div class="contact-item">
              <el-icon><Location /></el-icon>
              <div>
                <h4>{{$t('address')}}</h4>
                <p>{{$t('addressText')}}</p>
              </div>
            </div>
            <div class="contact-item">
              <el-icon><Phone /></el-icon>
              <div>
                <h4>{{$t('phone')}}</h4>
                <p>010-12345678</p>
              </div>
            </div>
            <div class="contact-item">
              <el-icon><Message /></el-icon>
              <div>
                <h4>{{$t('email')}}</h4>
                <p>info@wheat-quality.com</p>
              </div>
            </div>
            <div class="contact-item">
              <el-icon><Clock /></el-icon>
              <div>
                <h4>{{$t('workHours')}}</h4>
                <p>{{$t('workHoursText')}}</p>
              </div>
            </div>
          </div>
          <div class="contact-form">
            <h3>{{$t('onlineConsult')}}</h3>
            <el-form :model="contactForm" label-width="80px">
              <el-form-item :label="$t('name')">
                <el-input v-model="contactForm.name" :placeholder="$t('namePlaceholder')" />
              </el-form-item>
              <el-form-item :label="$t('phone')">
                <el-input v-model="contactForm.phone" :placeholder="$t('phonePlaceholder')" />
              </el-form-item>
              <el-form-item :label="$t('email')">
                <el-input v-model="contactForm.email" :placeholder="$t('emailPlaceholder')" />
              </el-form-item>
              <el-form-item :label="$t('message')">
                <el-input
                  v-model="contactForm.message"
                  type="textarea"
                  :rows="4"
                  :placeholder="$t('messagePlaceholder')"
                />
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="submitContact">{{$t('submitConsult')}}</el-button>
              </el-form-item>
            </el-form>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Header from '../components/Header.vue'

export default {
  name: 'About',
  components: {
    Header
  },
  data() {
    return {
      contactForm: {
        name: '',
        phone: '',
        email: '',
        message: ''
      }
    }
  },
  methods: {
    submitContact() {
      this.$message.success(this.$t('consultSubmitted'))
      this.contactForm = {
        name: '',
        phone: '',
        email: '',
        message: ''
      }
    }
  }
}
</script>

<style scoped>
.about {
  min-height: 100vh;
}

.about-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1574323347407-f5e1ad6d020b?w=1200&h=400&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 3rem;
  opacity: 0.9;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.8;
}

.section {
  padding: 4rem 0;
}

.bg-light {
  background: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #666;
  margin-bottom: 1.5rem;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.advantage-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.advantage-icon {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.advantage-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #333;
}

.advantage-card p {
  color: #666;
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-item {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
  color: #333;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #667eea;
}

.service-item ul {
  list-style: none;
  padding: 0;
}

.service-item li {
  padding: 0.5rem 0;
  color: #666;
  position: relative;
  padding-left: 1.5rem;
}

.service-item li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: grid;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-item .el-icon {
  font-size: 1.5rem;
  color: #667eea;
  margin-top: 0.25rem;
}

.contact-item h4 {
  color: #333;
  margin-bottom: 0.5rem;
}

.contact-item p {
  color: #666;
  margin: 0;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
}
</style>
